using Gateway.Infrastructure.AutoDI;
using Gateway.IQuery.Language.Result;

namespace Gateway.IQuery.Language;

/// <summary>
/// 运行语言查询
/// </summary>
public interface ILanguageQuery : IDependency
{
    /// <summary>
    /// 获取未删除的列表数据
    /// </summary>
    /// <returns></returns>
    Task<List<LanguageDetailResult>> GetAllList();

    /// <summary>
    /// 获取可用的信息- 未删除  未禁用
    /// </summary>
    /// <returns></returns>
    Task<List<LanguageSimpleResult>> GetAvailableList();

    /// <summary>
    /// 根据语言获取详情
    /// </summary>
    /// <param name="lang"></param>
    /// <returns></returns>
    Task<LanguageDetailResult> GetDetailByLang(string lang);


    /// <summary>
    /// 根据语言获取扩展类库
    /// </summary>
    /// <param name="languageId">语言标识</param>
    /// <returns></returns>
    Task<List<LanguageExtensionCodeDetailResult>> GetCodes(string languageId);
    
    /// <summary>
    /// 根据语言获取扩展类库 - 语言code
    /// </summary>
    /// <param name="language">语言code</param>
    /// <returns></returns>
    Task<List<LanguageExtensionCodeDetailResult>> GetCodesByLang(string language);


    /// <summary>
    /// 根据 依赖代码的集合查询代码详情
    /// </summary>
    /// <param name="ids"></param>
    /// <returns></returns>
    Task<List<LanguageExtensionCodeDetailResult>> GetLangExtensionCodeByIds(List<string> ids);
}